package com.campus.model.dto;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @desc:
 * @author: linchenyi
 * @date: 2024/10/17 15:38
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "分页结果")
public class PageResult<T> implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "数据")
    private List<T> data;
    @ApiModelProperty(value = "当前页")
    @NotNull
    private Integer pageNum;
    @ApiModelProperty(value =  "页面大小")
    @NotNull
    private Integer pageSize;
    @ApiModelProperty(value = "总条数")
    private Integer total;

}
